ImageMagick Image libraries
For its image, audio and video libraries EMu uses the ImageMagick libraries, an open source solution with support for new image formats and metadata standards as they emerge.
Access to metadata (EXIF, IPTC and XMP) stored in image files is also made available through ImageMagick, and EMu is able to use this support to extract metadata from master images and to embed metadata into derived images (configured using Registry entries).
This section provides details about:
The ImageMagick libraries distributed with EMu are stored under the same directory as the program executable. If a network installation is performed, the libraries reside on a server machine in a directory accessible to all client machines. In the case of a standalone installation, they are installed on the local machine. The libraries do not require any registration with Windows (that is, they are not COM objects). The directory structure is:
where:
ImageMagick Core Libraries
provide the core image functionality (e.g. resizing code, etc.) and Configuration Files contains language specific text and other configuration files. These files do not need to be modified.Image Reader/Writers
is a collection of files used to read and write specific image formats. For example, IM_MOD_RL_jpeg_.dll is used to read and write JPEG files.Image Filters
are used to provide statistical information about images (not used by EMu).
By default EMu installs ImageMagick's 16 bit libraries. These libraries are capable of storing 16 bits of colour information per colour channel, that is:
- 48 bits per pixel for RGB images
- 64 bits per pixel for CMYK
Previously, most images produced only stored 8 bits of colour information per colour channel, but newer digital devices are now capable of producing 16 bit images that give a greater colour range, resulting in "truer" colour pictures. It is to cater for these images that EMu distributes the 16 bit libraries.
Note: 8 bit images can be read and manipulated by the 16 bit libraries without any loss of definition.
There is however an overhead associated with providing support for 16 bit images. When ImageMagick reads an image it decodes the file format (via a coder) and stores it in an uncompressed pixel format in memory. Each pixel uses 64 bits or 8 bytes regardless of the number of bits per pixel in the image file. If a 1000 pixels by 1000 pixels image is read, the memory required to hold the image is 8 Mb (1000 * 1000 * 8 bytes). If a 5000 pixel by 5000 pixel image is read however, 200 Mb is required (5000 * 5000 * 8 bytes) even if it is a monochrome image!
Note: Unless there is at least 1 Gb of memory installed, a computer will slow down considerably when dealing with such images. Therefore before manipulating large images, it will be worth confirming that there is sufficient computer memory to manipulate the images.
EMu loads the ImageMagick libraries dynamically the first time that are required. This means that EMu determines where the libraries are installed (in the same directory as the EMu executable by default) and having done so "loads" them into memory. In order to locate the libraries EMu first looks up the MAGICK_HOME
environment variable. If it is set, EMu will attempt to load the ImageMagick libraries from the directory specified by the environment variable. If the environment variable is not set, EMu will look under the executable directory.
It is possible to take advantage of the MAGICK_HOME
environment variable to force EMu to load a different version of the ImageMagick libraries than the ones distributed with EMu. For instance, to halve memory usage and load images 33% faster, it is possible to use the 8 bit ImageMagick libraries.
Note: By doing so however, it will not be possible to view or read 16 bit images.
To bypass the libraries distributed with EMu:
- Install the required version of ImageMagick on your local machine or network server. You can download the releases from http://www.imagemagick.org/script/download.php. Be sure to download the DLL version, not the static version.
- Run Start>Control Panel>System and select the Advanced tab.
- Click the Environment Variables button.
- Under User variables for..., click the New button.
- Enter
MAGICK_HOME
for the Variable name and set the Variable value to the directory into which ImageMagick was installed: - Click the OK button to save the setting.
Now, when EMu loads the ImageMagick libraries it will load those under the specified directory.
Note: Use this technique to install later releases of the libraries that may support more image formats (although the libraries distributed with EMu will be updated on a regular basis).
If your organization does not want to use the 16 bit libraries and you have a network installation, copy the contents of the 8 bit image directory over the ImageMagick directory under the EMu executable directory. Using this technique it is not necessary to set the MAGICK_HOME
environment variable.
Note: Note however that the next upgrade you perform will replace your libraries with the 16 bit versions, so it will be necessary to perform the copy again.
If the ImageMagick libraries cannot be loaded, an error message will display indicating that EMu:
Cannot load ImageMagick libraries
If you have set the MAGICK_HOME
environment variable, this error indicates that one of the following conditions is not true:
- The environment variable value must contain the path to an existing directory.
- As a minimum the user must have the ability to list files in the specified directory.
- A valid set of ImageMagick libraries, including a
config
and modules directory and a series of DLL files must exist in the specified directory. - All DLLs in the specified directory and
modules/coders
must have Read and Execute permission for the current user. - As a minimum all directories below the specified directory (namely config, modules, modules/coders and modules/filters) must have List Files permission.
- As a minimum all configuration files in config must have Read permission.
ImageMagick uses delegates to provide support for certain image formats. A delegate is a piece of software that converts the image format into a format that ImageMagick can handle. EMu bundles two delegates with the ImageMagick libraries:
- dcraw.exe (handles digital camera RAW format)
- hp2xx.exe (handles HPGL files)
If you try to import or generate an image format that requires a delegate and the delegate is not installed, an error message will display indicating that: Postscript delegate failed...
In order to determine the delegate required and to download the necessary software, visit the ImageMagick Formats (http://www.imagemagick.org/script/formats.php) page. Once the delegate software is installed the image format will be useable.
ImageMagick provides support for a large number of image formats. The actual list of file types supported depends on the version of ImageMagick installed. When EMu needs to display a list of supported image formats (either for adding an image or generating a derivative) it asks ImageMagick for a list of file formats that have coders. EMu then consults the Windows registry to determine whether each entry in the list has a MIME type of image
, discarding entries that do not. Thus if an installed application handles a given image format, EMu will add it to the list of available Image Files. Finally, the image format must have an encoder (used to write the format) and a decoder (used to read the format).
The list of image formats supported is:
File Extension | Coder |
Read/ Write/ Multi-page |
Format |
---|---|---|---|
A |
RAW |
rw+ |
Raw alpha samples |
AVS |
AVS |
rw+ |
AVS X image |
B |
RAW |
rw+ |
Raw blue samples |
BIE |
JBIG |
rw- |
Joint Bi-level Image experts Group interchange format (1.5) |
BMP |
BMP |
rw- |
Microsoft Windows bitmap image |
C |
RAW |
rw+ |
Raw cyan samples |
CIN |
CIN |
rw+ |
Cineon Image File |
CMYK |
CMYK |
rw+ |
Raw cyan, magenta, yellow, and black samples |
CMYKA |
CMYK |
rw+ |
Raw cyan, magenta, yellow, black, and opacity samples |
CUR |
CUR |
rw- |
Microsoft icon |
CUT |
CUT |
r-- |
DR Halo |
DCM |
DCM |
r-- |
Digital Imaging and Communications in Medicine image |
DCX |
PCX |
rw+ |
ZSoft IBM PC multi-page Paintbrush |
DNG |
DNG |
r-- |
Digital Negative |
EMF |
WMF |
r-- |
Windows WIN32 API rendered Enhanced Meta File |
EPDF |
|
rw- |
Encapsulated Portable Document Format |
EPI |
PS |
rw- |
Encapsulated PostScript Interchange format |
EPS |
PS |
rw- |
Encapsulated PostScript |
EPSF |
PS |
rw- |
Encapsulated PostScript |
EPSI |
PS |
rw- |
Encapsulated PostScript Interchange format |
EPT |
EPT |
rw- |
Encapsulated PostScript with TIFF preview |
EPT2 |
EPT |
rw- |
Encapsulated PostScript Level II with TIFF preview |
EPT3 |
EPT |
rw+ |
Encapsulated PostScript Level III with TIFF preview |
FAX |
FAX |
rw+ |
Group 3 FAX |
FITS |
FITS |
rw- |
Flexible Image Transport System |
FTS |
FTS |
rw- |
Flexible Image Transport System |
G |
RAW |
rw+ |
Raw green samples |
G3 |
FAX |
rw- |
Group 3 FAX |
GIF |
GIF |
rw+ |
CompuServe graphics interchange format |
GIF87 |
GIF |
rw- |
CompuServe graphics interchange format (version 87a) |
GRAY |
GRAY |
rw+ |
Raw gray samples |
ICB |
TGA |
rw+ |
Truevision Targa image |
ICO |
ICON |
rw- |
Microsoft icon |
ICON |
ICON |
rw- |
Microsoft icon |
JBG |
JBIG |
rw+ |
Joint Bi-level Image experts Group interchange format (1.5) |
JBIG |
JBIG |
rw+ |
Joint Bi-level Image experts Group interchange format (1.5) |
JNG |
PNG |
rw- |
JPEG Network Graphics |
JP2 |
JP2 |
rw- |
JPEG-2000 File Format Syntax |
JPC |
JPC |
rw- |
JPEG-2000 Code Stream Syntax |
JPEG |
JPEG |
rw- |
Joint Photographic Experts Group JFIF format (62) |
JPG |
JPEG |
rw- |
Joint Photographic Experts Group JFIF format |
JPX |
JPX |
rw- |
JPEG-2000 File Format Syntax |
K |
RAW |
rw+ |
Raw black samples |
M |
RAW |
rw+ |
Raw magenta samples |
MAP |
MAP |
rw- |
Colormap intensities and indices |
MAT |
MAT |
rw+ |
MATLAB image format |
MIFF |
MIFF |
rw+ |
Magick Image File Format |
MNG |
PNG |
rw+ |
Multiple-image Network Graphics (libpng 1.2.8) |
MONO |
MONO |
rw- |
Bi-level bitmap in least-significant-byte first order |
MPC |
MPC |
rw+ |
Magick Persistent Cache image format |
MSL |
MSL |
rw+ |
Magick Scripting Language |
MTV |
MTV |
rw+ |
MTV Raytracing image format |
MVG |
MVG |
rw- |
Magick Vector Graphics |
O |
RAW |
rw+ |
Raw opacity samples |
OTB |
OTB |
rw- |
On-the-air bitmap |
PAL |
UYVY |
rw- |
16bit/pixel interleaved YUV |
PALM |
PALM |
rw+ |
Palm pixmap |
PAM |
PNM |
rw+ |
Common 2-dimensional bitmap format |
PBM |
PNM |
rw+ |
Portable bitmap format (black and white) |
PCD |
PCD |
rw- |
Photo CD |
PCDS |
PCD |
rw- |
Photo CD |
PCL |
PCL |
rw- |
Printer Control Language |
PCT |
PICT |
rw- |
Apple Macintosh QuickDraw/PICT |
PCX |
PCX |
rw- |
ZSoft IBM PC Paintbrush |
PDB |
PDB |
rw+ |
Palm Database ImageViewer Format |
|
|
rw+ |
Portable Document Format |
PGM |
PNM |
rw+ |
Portable graymap format (gray scale) |
PGX |
PGX |
r-- |
JPEG-2000 VM Format |
PICON |
XPM |
rw- |
Personal Icon |
PICT |
PICT |
rw- |
Apple Macintosh QuickDraw/PICT |
PIX |
PIX |
r-- |
Alias/Wavefront RLE image format |
PJPEG |
JPEG |
rw- |
Progressive Joint Photographic Experts Group JFIF |
PNG |
PNG |
rw- |
Portable Network Graphics (libpng 1.2.8) |
PNG24 |
PNG |
rw- |
24-bit RGB PNG, opaque only (zlib 1.2.3) |
PNG32 |
PNG |
rw- |
32-bit RGBA PNG, semitransparency OK |
PNG8 |
PNG |
rw- |
8-bit indexed PNG, binary transparency only |
PNM |
PNM |
rw+ |
Portable anymap |
PPM |
PNM |
rw+ |
Portable pixmap format (color) |
PS |
PS |
rw+ |
PostScript |
PSD |
PSD |
rw+ |
Adobe Photoshop bitmap |
PTIF |
TIFF |
rw- |
Pyramid encoded TIFF |
PWP |
PWP |
r-- |
Seattle Film Works |
R |
RAW |
rw+ |
Raw red samples |
RAS |
SUN |
rw+ |
SUN Rasterfile |
RGB |
RGB |
rw+ |
Raw red, green, and blue samples |
RGBA |
RGB |
rw+ |
Raw red, green, blue, and alpha samples |
RGBO |
RGB |
rw+ |
Raw red, green, blue, and opacity samples |
RLA |
RLA |
r-- |
Alias/Wavefront image |
RLE |
RLE |
r-- |
Utah Run length encoded image |
SCR |
SCR |
r-- |
ZX-Spectrum SCREEN$ |
SCT |
SCT |
r-- |
Scitex HandShake |
SFW |
SFW |
r-- |
Seattle Film Works |
SGI |
SGI |
rw+ |
Irix RGB image |
STEGANO |
STEGANO |
r-- |
Steganographic image |
SUN |
SUN |
rw+ |
SUN Rasterfile |
SVG |
SVG |
rw+ |
Scalable Vector Graphics (XML 2.4.19) |
SVGZ |
SVG |
rw+ |
Compressed Scalable Vector Graphics (XML 2.4.19) |
TEXT |
TXT |
rw+ |
Text |
TGA |
TGA |
rw+ |
Truevision Targa image |
TIFF |
TIFF |
rw+ |
Tagged Image File Format (LIBTIFF, Version 3.8.2) |
TIM |
TIM |
r-- |
PSX TIM |
TXT |
TXT |
rw+ |
Text |
UYVY |
UYVY |
rw- |
16bit/pixel interleaved YUV |
VDA |
TGA |
rw+ |
Truevision Targa image |
VICAR |
VICAR |
rw- |
VICAR rasterfile format |
VID |
VID |
rw+ |
Visual Image Directory |
VIFF |
VIFF |
rw+ |
Khoros Visualization image |
VST |
TGA |
rw+ |
Truevision Targa image |
WBMP |
WBMP |
rw- |
Wireless Bitmap (level 0) image |
WMF |
WMF |
r-- |
Windows Meta File |
WMFWIN32 |
WMFWIN32 |
r-- |
Windows WIN32 API rendered Meta File |
WMZ |
WMZ |
r-- |
Compressed Windows Meta File |
WPG |
WPG |
r-- |
Word Perfect Graphics |
X |
X |
rw+ |
X Image |
XBM |
XBM |
rw- |
X Windows system bitmap (black and white) |
XC |
XC |
r-- |
Constant image uniform colour |
XCF |
XCF |
r-- |
GIMP image |
XPM |
XPM |
rw- |
X Windows system pixmap (colour) |
XV |
VIFF |
rw+ |
Khoros Visualization image |
XWD |
XWD |
rw- |
X Windows system window dump (colour) |
Y |
RAW |
rw+ |
Raw yellow samples |
YCbCr |
YCbCr |
rw+ |
Raw Y, Cb, and Cr samples |
YCbCrA |
YCbCr |
rw+ |
Raw Y, Cb, Cr, and opacity samples |
YUV* |
YUV |
rw- |
CCIR 601 4:1:1 or 4:2:2 |
where:
|
indicates the format can be read (that is decoded) |
|
indicates the format can be written (that is encoded) |
|
indicates the format handles multi-page images |
The default list of image formats supported by EMu is:
- BMP - Microsoft Windows Bitmap Image
- DCX - ZSoft IBM PC multi-page Paintbrush
- GIF - CompuServe Graphics Interchange Format
- JP2 - JPEG 2000
- JPEG - Joint Photographic Experts Group
- PCD - Photo CD
- PCX - ZSoft IBM PC Paintbrush
- PNG - Portable Network Graphics
- TGA - Truevision Targa Image
- TIFF - Tagged Image File Format
However, the list is typically longer, depending on the software installed on a computer.